Integrand size = 34, antiderivative size = 308 \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=-\frac {(1-m) \left (i B \left (3+m-2 m^2\right )-A \left (3-7 m+2 m^2\right )\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x)}{24 a^3 d (1+m)}+\frac {(2-m) m (B+i A (5-2 m)+2 B m) \operatorname {Hypergeometric2F1}\left (1,\frac {2+m}{2},\frac {4+m}{2},-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x)}{24 a^3 d (2+m)}+\frac {(A+i B) \tan ^{1+m}(c+d x)}{6 d (a+i a \tan (c+d x))^3}+\frac {(i B (1-2 m)+A (7-2 m)) \tan ^{1+m}(c+d x)}{24 a d (a+i a \tan (c+d x))^2}+\frac {(2-m) (A (5-2 m)-i (B+2 B m)) \tan ^{1+m}(c+d x)}{24 d \left (a^3+i a^3 \tan (c+d x)\right )} \]
-1/24*(1-m)*(I*B*(-2*m^2+m+3)-A*(2*m^2-7*m+3))*hypergeom([1, 1/2+1/2*m],[3 /2+1/2*m],-tan(d*x+c)^2)*tan(d*x+c)^(1+m)/a^3/d/(1+m)+1/24*(2-m)*m*(B+I*A* (5-2*m)+2*B*m)*hypergeom([1, 1+1/2*m],[2+1/2*m],-tan(d*x+c)^2)*tan(d*x+c)^ (2+m)/a^3/d/(2+m)+1/6*(A+I*B)*tan(d*x+c)^(1+m)/d/(a+I*a*tan(d*x+c))^3+1/24 *(I*B*(1-2*m)+A*(7-2*m))*tan(d*x+c)^(1+m)/a/d/(a+I*a*tan(d*x+c))^2+1/24*(2 -m)*(A*(5-2*m)-I*(2*B*m+B))*tan(d*x+c)^(1+m)/d/(a^3+I*a^3*tan(d*x+c))
Time = 4.33 (sec) , antiderivative size = 227, normalized size of antiderivative = 0.74 \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=\frac {\tan ^{1+m}(c+d x) \left (\frac {(-1+m) \left (i B \left (3+m-2 m^2\right )+A \left (-3+7 m-2 m^2\right )\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\tan ^2(c+d x)\right )}{1+m}-\frac {(-2+m) m (B+2 B m-i A (-5+2 m)) \operatorname {Hypergeometric2F1}\left (1,\frac {2+m}{2},\frac {4+m}{2},-\tan ^2(c+d x)\right ) \tan (c+d x)}{2+m}+\frac {4 i (A+i B)}{(-i+\tan (c+d x))^3}+\frac {A (-7+2 m)+i B (-1+2 m)}{(-i+\tan (c+d x))^2}+\frac {(-2+m) (B+2 B m-i A (-5+2 m))}{-i+\tan (c+d x)}\right )}{24 a^3 d} \]
(Tan[c + d*x]^(1 + m)*(((-1 + m)*(I*B*(3 + m - 2*m^2) + A*(-3 + 7*m - 2*m^ 2))*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, -Tan[c + d*x]^2])/(1 + m) - ((-2 + m)*m*(B + 2*B*m - I*A*(-5 + 2*m))*Hypergeometric2F1[1, (2 + m)/2, (4 + m)/2, -Tan[c + d*x]^2]*Tan[c + d*x])/(2 + m) + ((4*I)*(A + I*B))/(-I + Tan[c + d*x])^3 + (A*(-7 + 2*m) + I*B*(-1 + 2*m))/(-I + Tan[c + d*x])^2 + ((-2 + m)*(B + 2*B*m - I*A*(-5 + 2*m)))/(-I + Tan[c + d*x])))/(24*a^3*d)
Time = 1.51 (sec) , antiderivative size = 319, normalized size of antiderivative = 1.04, number of steps used = 14, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.382, Rules used = {3042, 4079, 3042, 4079, 25, 3042, 4079, 27, 3042, 4021, 3042, 3957, 278}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^m (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3}dx\) |
\(\Big \downarrow \) 4079 |
\(\displaystyle \frac {\int \frac {\tan ^m(c+d x) (a (A (5-m)-i B (m+1))-a (i A-B) (2-m) \tan (c+d x))}{(i \tan (c+d x) a+a)^2}dx}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\tan (c+d x)^m (a (A (5-m)-i B (m+1))-a (i A-B) (2-m) \tan (c+d x))}{(i \tan (c+d x) a+a)^2}dx}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4079 |
\(\displaystyle \frac {\frac {\int -\frac {\tan ^m(c+d x) \left (a^2 \left (i B \left (-2 m^2+3 m+5\right )-A \left (2 m^2-9 m+13\right )\right )-a^2 (B (1-2 m)-i A (7-2 m)) (1-m) \tan (c+d x)\right )}{i \tan (c+d x) a+a}dx}{4 a^2}+\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\int \frac {\tan ^m(c+d x) \left (a^2 \left (i B \left (-2 m^2+3 m+5\right )-A \left (2 m^2-9 m+13\right )\right )-a^2 (B (1-2 m)-i A (7-2 m)) (1-m) \tan (c+d x)\right )}{i \tan (c+d x) a+a}dx}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\int \frac {\tan (c+d x)^m \left (a^2 \left (i B \left (-2 m^2+3 m+5\right )-A \left (2 m^2-9 m+13\right )\right )-a^2 (B (1-2 m)-i A (7-2 m)) (1-m) \tan (c+d x)\right )}{i \tan (c+d x) a+a}dx}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4079 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {\int 2 \tan ^m(c+d x) \left (a^3 (1-m) \left (i B \left (-2 m^2+m+3\right )-A \left (2 m^2-7 m+3\right )\right )-a^3 (2-m) m (2 m B+B+i A (5-2 m)) \tan (c+d x)\right )dx}{2 a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {\int \tan ^m(c+d x) \left (a^3 (1-m) \left (i B \left (-2 m^2+m+3\right )-A \left (2 m^2-7 m+3\right )\right )-a^3 (2-m) m (2 m B+B+i A (5-2 m)) \tan (c+d x)\right )dx}{a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {\int \tan (c+d x)^m \left (a^3 (1-m) \left (i B \left (-2 m^2+m+3\right )-A \left (2 m^2-7 m+3\right )\right )-a^3 (2-m) m (2 m B+B+i A (5-2 m)) \tan (c+d x)\right )dx}{a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4021 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {a^3 (1-m) \left (-A \left (2 m^2-7 m+3\right )+i B \left (-2 m^2+m+3\right )\right ) \int \tan ^m(c+d x)dx-a^3 (2-m) m (i A (5-2 m)+2 B m+B) \int \tan ^{m+1}(c+d x)dx}{a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {a^3 (1-m) \left (-A \left (2 m^2-7 m+3\right )+i B \left (-2 m^2+m+3\right )\right ) \int \tan (c+d x)^mdx-a^3 (2-m) m (i A (5-2 m)+2 B m+B) \int \tan (c+d x)^{m+1}dx}{a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3957 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {\frac {a^3 (1-m) \left (-A \left (2 m^2-7 m+3\right )+i B \left (-2 m^2+m+3\right )\right ) \int \frac {\tan ^m(c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}-\frac {a^3 (2-m) m (i A (5-2 m)+2 B m+B) \int \frac {\tan ^{m+1}(c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}}{a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
\(\Big \downarrow \) 278 |
\(\displaystyle \frac {\frac {a (A (7-2 m)+i B (1-2 m)) \tan ^{m+1}(c+d x)}{4 d (a+i a \tan (c+d x))^2}-\frac {\frac {\frac {a^3 (1-m) \left (-A \left (2 m^2-7 m+3\right )+i B \left (-2 m^2+m+3\right )\right ) \tan ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\tan ^2(c+d x)\right )}{d (m+1)}-\frac {a^3 (2-m) m (i A (5-2 m)+2 B m+B) \tan ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+2}{2},\frac {m+4}{2},-\tan ^2(c+d x)\right )}{d (m+2)}}{a^2}-\frac {a^2 (2-m) (A (5-2 m)-i (2 B m+B)) \tan ^{m+1}(c+d x)}{d (a+i a \tan (c+d x))}}{4 a^2}}{6 a^2}+\frac {(A+i B) \tan ^{m+1}(c+d x)}{6 d (a+i a \tan (c+d x))^3}\) |
((A + I*B)*Tan[c + d*x]^(1 + m))/(6*d*(a + I*a*Tan[c + d*x])^3) + ((a*(I*B *(1 - 2*m) + A*(7 - 2*m))*Tan[c + d*x]^(1 + m))/(4*d*(a + I*a*Tan[c + d*x] )^2) - (-((a^2*(2 - m)*(A*(5 - 2*m) - I*(B + 2*B*m))*Tan[c + d*x]^(1 + m)) /(d*(a + I*a*Tan[c + d*x]))) + ((a^3*(1 - m)*(I*B*(3 + m - 2*m^2) - A*(3 - 7*m + 2*m^2))*Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, -Tan[c + d*x]^2] *Tan[c + d*x]^(1 + m))/(d*(1 + m)) - (a^3*(2 - m)*m*(B + I*A*(5 - 2*m) + 2 *B*m)*Hypergeometric2F1[1, (2 + m)/2, (4 + m)/2, -Tan[c + d*x]^2]*Tan[c + d*x]^(2 + m))/(d*(2 + m)))/a^2)/(4*a^2))/(6*a^2)
3.3.10.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( -b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && (ILtQ[p, 0 ] || GtQ[a, 0])
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d Subst[Int [x^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[((b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Tan[e + f*x])^m, x], x] + Simp[d/b Int [(b*Tan[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x] && NeQ[c^ 2 + d^2, 0] && !IntegerQ[2*m]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[(a*A + b*B)*(a + b*Tan[e + f*x])^m*((c + d*Tan[e + f*x])^(n + 1)/(2*f*m*( b*c - a*d))), x] + Simp[1/(2*a*m*(b*c - a*d)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x] /; Free Q[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] && !GtQ[n, 0]
\[\int \frac {\left (\tan ^{m}\left (d x +c \right )\right ) \left (A +B \tan \left (d x +c \right )\right )}{\left (a +i a \tan \left (d x +c \right )\right )^{3}}d x\]
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3}} \,d x } \]
integral(1/8*((A - I*B)*e^(6*I*d*x + 6*I*c) + (3*A - I*B)*e^(4*I*d*x + 4*I *c) + (3*A + I*B)*e^(2*I*d*x + 2*I*c) + A + I*B)*((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))^m*e^(-6*I*d*x - 6*I*c)/a^3, x)
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=\frac {i \left (\int \frac {A \tan ^{m}{\left (c + d x \right )}}{\tan ^{3}{\left (c + d x \right )} - 3 i \tan ^{2}{\left (c + d x \right )} - 3 \tan {\left (c + d x \right )} + i}\, dx + \int \frac {B \tan {\left (c + d x \right )} \tan ^{m}{\left (c + d x \right )}}{\tan ^{3}{\left (c + d x \right )} - 3 i \tan ^{2}{\left (c + d x \right )} - 3 \tan {\left (c + d x \right )} + i}\, dx\right )}{a^{3}} \]
I*(Integral(A*tan(c + d*x)**m/(tan(c + d*x)**3 - 3*I*tan(c + d*x)**2 - 3*t an(c + d*x) + I), x) + Integral(B*tan(c + d*x)*tan(c + d*x)**m/(tan(c + d* x)**3 - 3*I*tan(c + d*x)**2 - 3*tan(c + d*x) + I), x))/a**3
Exception generated. \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=\text {Exception raised: RuntimeError} \]
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3}} \,d x } \]
Timed out. \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^3} \, dx=\int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )}{{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^3} \,d x \]